#ifndef _OI_PLSCANNERCORE_VALUELABEL_HPP_
#define _OI_PLSCANNERCORE_VALUELABEL_HPP_

#include "PLScannerCore/OiPLScannerCore.hpp"

#define  MAX_LIMIT_VALUE 999999

namespace Oi
{
    namespace PLScannerCore
    {
        class OI_PLSCANNER_CORE_API ValueLabel : public QWidget
        {

        public:
            enum LabelStatus
            {
                LS_Invalid = -1,
                LS_Unchecked = 0,
                LS_Pass = 1,
                LS_Warning = 2,
                LS_Error = 3,
            };

        public:
            ValueLabel( QWidget * parent = nullptr );

        public:
            LabelStatus status();

        public:
            void setPrecise(int);
            void setUnit(QString unit);
            void setValue(double value);
            void setText(QString text);
            void setFontSize(int fz);
            void setTitleFontSize(int fz);
            void setBorderVisible(bool enable);
            void setStdValue(double);

        public:
            void setCheckEnable(bool);
            void setEarlyUpper(double);
            void setEarlyLower(double);
            void setUpper(double);
            void setLower(double);

        protected:
            void paintEvent(QPaintEvent *event);

        private:
            OI_DECLARE_IMPL(ValueLabel);
            OI_DISABLE_COPY(ValueLabel);

        };
    }
}

#endif
